package ExtendsDemo;

public class Works {
    private String name;
    private String id;
    private int money;

    public Works() {
    }

    public Works(String name, String id, int money) {
        this.name = name;
        this.id = id;
        this.money = money;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public void show(){
        System.out.println("姓名："+name+"，工号："+id+"，工资："+money);
    }
    public void yearMoney(){
        System.out.println(name+"的年薪为："+money*12);
    }
}
